<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use App\Model\Article;
use App\Model\Base;
class ArticleType extends Base
{
    //
    protected $guarded=[];
    /**
     * 一对多关联文章
     */
    public function articles()
    {
        return $this->hasMany(Article::class,'type_id','id')->where('openness','=','1');
    }
}
